<?php
namespace Home\Model;
use Think\Model;
class AccountModel extends Model {
    public function getAccountList($cond){
        if(!$cond){
            return false;
        }
        $res = M('account')
            ->where($cond['condition'])
            ->page($cond['page'])
            ->field($cond['field'])
            ->select();
    	return $res;
    }
    public function getAccountInfo($cond){
        if(!$cond){
            return false;
        }
        $res = M('account')
            ->where($cond)
            ->find();
        return $res;
    }
    public function editAccountInfo($cond,$data){
        if(!$cond || !$data){
            return false;
        }
        $res = M('account')
            ->where($cond)
            ->save($data);
        return $res;
    }
}